package cn.changeforyou.web.cloud.auth.controller;

import cn.changeforyou.web.cloud.auth.entity.Menu;
import cn.changeforyou.web.cloud.auth.service.MenuService;
import cn.changeforyou.web.cloud.webBase.common.model.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("menu")
public class MenuController {

    @Resource
    private MenuService menuService;

    @GetMapping("queryMenus")
    public Result<List<Menu>> queryMenus(){
        return Result.success(menuService.list());
    }

}
